Skip to content

build(deps): upgrade Electron 29 -> 45 and move to Node 24 - #136

Merged
pfeerick merged 7 commits into
mainfrom
deps/electron-upgrade
Nov 18, 2026
Merged

pfeerick merged 7 commits into
mainfrom
deps/electron-upgrade

Conversation

@raphaelcoeffic

@raphaelcoeffic raphaelcoeffic commented Mar 7, 2026 •

Copy link
Copy Markdown
Member

Upgrades Electron 29 → 45 (35 is already end-of-life; 43–45 are the supported majors), moves the toolchain to Node 24 LTS, and drops dependencies that no longer pull their weight. Rebased onto current main (after the Yarn 4 upgrade in #160); this absorbs the follow-up PRs #161 and #162.

Please merge with Rebase and merge so each commit lands on main individually with its original author.

Commits

Raphael Coeffic

  1. chore: upgrade utility packages (date-fns 2→4, uuid 9→11, semver 7.3→7.7, debounce 1→2, nanoevents 6→9, plus matching @types/*)
  2. chore: upgrade Electron 29 -> 35 and related packages (electron ^35, electron-builder ^26, @electron/rebuild ^4, electron-devtools-installer ^4; Apollo devtools removed as v4 no longer exports it)

Peter Feerick

  1. build(deps): upgrade Electron 35 to 45: electron ^45.3.3, electron-builder ^26.18.0, @electron/rebuild ^4.2.1
  2. refactor(deps): drop date-fns and electron-window-controls
    • date-fns was used for one format(ms, "mm:ss") call; newer 4.x typings need TypeScript 5. Replaced with a tested formatElapsed helper, which also fixes wrong minutes in half-hour-offset timezones (e.g. India) and minutes wrapping after an hour.
    • electron-window-controls inlined as two IPC channels (src/main/windowControls.ts). It declared electron@^12 as a regular dependency, so every install pulled in a second Electron. Handlers are now registered once at startup rather than per window creation.
  3. build: move to Node 24 LTS
    • .node-version 24.22.3 and CI node-version: "24"; @types/node ^24
    • tsconfig lib es2021 → es2022 (matches target; Array.prototype.at() was only type-checking via @types/node 20)
    • @typescript-eslint/* refreshed within ^5 (5.62.0) to accept es2022
    • Yarn's implicit node-gyp@latest refreshed 8.4.0 → 13.1.0, which lets CI drop the Python 3.9 + setuptools pin (node-gyp 8 needed distutils)
  4. docs: update devcontainer and README for Node 24: drop python3-setuptools, install Corepack if Node doesn't bundle it (Node 25+), README Node/Corepack instructions
  5. chore: bump version to 0.2.0: first version change since 0.1.0; also lets Windows MSI installers recognise newer builds as upgrades

Each commit's yarn.lock was regenerated with Yarn 4 during the rebase (date-fns held at the 4.1.0 Raphael tested until commit 4 removes it).

⚠️ User-facing

  • Minimum macOS is now 13 (Ventura) (Electron 44+). All Apple Silicon Macs are fine; Intel Macs on macOS 11/12 lose support. Release notes should mention this.
  • Electron 44+ is 64-bit only; Buddy builds no 32-bit targets, so nothing changes there.
  • The folder picker now opens in Downloads by default (Electron 43) since we don't pass defaultPath.
  • Version is now 0.2.0. Installer file names include it, so assets in the rolling latest release become edgetx-buddy-0.2.0.*. Direct links to …/releases/download/latest/edgetx-buddy-0.1.0.* (website, docs, pinned messages) will break; links to the release page are unaffected.

Electron 36–45 breaking-changes review

Nothing required code changes beyond the above:

  • Compiled preload only requires electron, so Electron 45's sandboxed-preload shim removal (Buffer, events, timers, url) doesn't apply.
  • e2e launches the packaged binary, so Electron 42 removing its postinstall download doesn't affect CI.
  • app.commandLine switches used are already lowercase (Electron 36 lowercases them).

Testing

Locally on Windows with Node 24, clean install:

  • yarn install --immutable, fmt:check, test:types, lint:all (0 errors), compile:production pass
  • Unit tests pass except 28 Windows-only failures in the test harness (execSync("node -e …") quoting under cmd.exe, absolute paths in an sdcard snapshot); CI runs these on Linux
  • App launches under Electron 45.3.3 with the usb native module loaded; minimize/close IPC verified by driving the app with the repo's Playwright 1.29 (so the e2e tooling still works with Electron 45)

Manual testing done (@pfeerick):

  • Web (preview deploy): firmware download and DFU flash, TX12 MK2 with 2.12.5
  • Native Windows app (CI build): cloud build of a nightly and DFU flash on GX10, with the cloud build progress timer (formatElapsed) showing correctly
  • Native Windows app (CI build): SD card update for TX12 MK2
  • macOS arm64 app (CI build, unsigned): DFU flash of a nightly, TX12 MK2
  • Linux AppImage (CI build): DFU flash of 2.12.5 from GitHub releases (not cloud build), TX12 MK2

Still to test:

  • Devcontainer rebuild

Note on macOS signing

build-and-test-app (macos-latest) has been failing on main since 17 Nov at the code-signing step (security set-key-partition-list, electron-builder 24.13.3 on the macos-26-arm64 image). That started before this PR and isn't caused by it. Signing only runs on pushes to main/tags, so this PR's CI can't show whether electron-builder 26 fixes it.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Mar 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 28.57143% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.84%. Comparing base (15a569e) to head (178bbee).

Files with missing lines Patch % Lines
src/main/index.ts 0.00% 6 Missing ⚠️
src/main/preload.ts 0.00% 2 Missing ⚠️
src/main/windowControls.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #136      +/-   ##
==========================================
- Coverage   36.87%   36.84%   -0.04%     
==========================================
  Files         116      117       +1     
  Lines        4301     4310       +9     
  Branches     1038     1038              
==========================================
+ Hits         1586     1588       +2     
- Misses       2509     2518       +9     
+ Partials      206      204       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@raphaelcoeffic
raphaelcoeffic force-pushed the deps/electron-upgrade branch from 7d643e5 to 00ce114 Compare March 7, 2026 05:03
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Mar 7, 2026 •

Copy link
Copy Markdown

Deploying buddy with  Cloudflare Pages  Cloudflare Pages

Latest commit: d5ea932
Status: ✅  Deploy successful!
Preview URL: https://ae9be7fb.buddy-7a6.pages.dev
Branch Preview URL: https://head.buddy-7a6.pages.dev

View logs

@github-actions

github-actions Bot commented Mar 7, 2026 •

Copy link
Copy Markdown

EdgeTX Buddy has been automatically deployed to Cloudflare.
✅ Preview: https://e6082c64.buddy-7a6.pages.dev
✅ Storybook: https://e6082c64.buddy-7a6.pages.dev/storybook

raphaelcoeffic and others added 6 commits November 18, 2026 18:23
Upgrade date-fns 2->4, uuid 9->11, semver 7.3->7.7, debounce 1->2,
nanoevents 6->9, and bump matching @types/* packages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Upgrade electron to ^35, electron-builder to ^25, @electron/rebuild to ^3.7
- Upgrade electron-devtools-installer to ^4 and remove APOLLO_DEVELOPER_TOOLS
  (no longer exported in v4)
- Requires manual app testing to verify USB native module and window behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- electron ^35 -> ^45.3.3 (35 is end-of-life; 43-45 are supported)
- electron-builder ^26.8.1 -> ^26.18.0
- @electron/rebuild ^4.0.3 -> ^4.2.1
- Pin date-fns to ~4.1.0: 4.4.0's type declarations import "./x.ts"
  paths that TypeScript 4.9 cannot resolve

Electron 44+ requires macOS 13 (Ventura) or later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Replace the single date-fns `format(ms, "mm:ss")` call with a small
  formatElapsed helper. This removes the ~4.1.0 pin (newer date-fns
  typings need a newer TypeScript) and fixes the elapsed time showing
  wrong minutes in timezones with half-hour offsets, as `format`
  interpreted the duration as a local time of day. Minutes also no
  longer wrap after an hour.
- Inline the minimize/close IPC from electron-window-controls. It
  declared electron@^12 as a regular dependency, so every install
  pulled in a second Electron. Handlers are now registered once at
  startup rather than on every window creation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- .node-version 22.23.5 -> 24.22.3 (also used by the devcontainer),
  and CI node-version "22" -> "24"
- @types/node ^20 -> ^24, matching the Node bundled with Electron 45
- tsconfig lib es2021 -> es2022 to match target. Code already uses
  Array.prototype.at(), which only type-checked because @types/node 20
  declared it globally.
- Refresh @typescript-eslint/* within ^5 (5.6.0 -> 5.62.0); 5.6 does
  not recognise the es2022 lib
- Refresh Yarn's implicit node-gyp@latest (8.4.0 -> 13.1.0), used to
  build fsevents on macOS, and drop the Python 3.9 + setuptools CI pin
  that node-gyp 8 needed for distutils

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Drop python3-setuptools from the devcontainer; it was only needed for
  node-gyp 8's distutils. python3 stays, node-gyp still requires it.
- Install Corepack in the devcontainer if Node doesn't bundle it
  (Node 25+ no longer does), so bumping .node-version keeps working
- README: node@22 -> node@24, drop python3-setuptools from the
  prerequisites, and replace the Node <16.10 Corepack instructions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pfeerick
pfeerick force-pushed the deps/electron-upgrade branch from d5ea932 to 4791952 Compare November 18, 2026 08:34
@pfeerick pfeerick changed the title chore: upgrade Electron 29 -> 35 and related packages build(deps): upgrade Electron 29 -> 45 and move to Node 24 Nov 18, 2026
First version change since the project started. Marks the move to
Electron 45 / Node 24 and the new macOS 13 minimum, and lets Windows
MSI installers recognise newer builds as upgrades.

Installer file names include the version, so assets in the rolling
`latest` release change from edgetx-buddy-0.1.0.* to
edgetx-buddy-0.2.0.*.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pfeerick
pfeerick merged commit 670c0a4 into main Nov 18, 2026
16 of 18 checks passed
@pfeerick
pfeerick deleted the deps/electron-upgrade branch November 18, 2026 10:09

This branch was successfully deployed

1 active deployment
preview — 178bbee4 Deployed Nov 18, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants